package com.zmj.sy.mom.srv.aps.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmj.sy.mom.srv.aps.bean.entity.mes.PartExcept;
import com.zmj.sy.mom.srv.aps.bean.entity.mes.PartExceptDetail;
import com.zmj.sy.mom.srv.aps.bean.vo.partexceptdetail.PartExceptDetailListReqVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PartExceptMapper extends SyMapper<PartExcept>{


    @Select(" select ped.id, pe.plm_id, pe.drawing, pe.construct_code, pe.create_date_time, ped.process_count, ped.phase_code, ped.`status` " +
            " from tb_mes_part_except_detail ped " +
            " left join tb_mes_part_except pe on ped.part_except_id = pe.id " +
            "  ${ew.customSqlSegment}")
    Page<PartExceptDetailListReqVo> list(@Param(Constants.WRAPPER) QueryWrapper<PartExceptDetail> query, Page<PartExceptDetail> page);
}
